home *** CD-ROM | disk | FTP | other *** search
/ Birds of My State or Province 4.5 / eField Guide Viewer.iso / pc / Windows / CR115.cab / viewrpt.asp.09012B1E_8731_4B9A_8C8B_6CA68543BF28 < prev    next >
Encoding:
Text File  |  2004-11-22  |  1.4 KB  |  62 lines

  1. <!--
  2.   File Version Start - Do not remove this if you are modifying the file
  3.   Build: 11.0.0
  4.   File Version End
  5.  
  6.     (c) 2004 Business Objects, Inc.  All rights reserved.
  7.     This code or any derivative work thereof may not be distributed without the express written
  8.     permission of Business Objects.
  9. -->
  10. <%@ Language=JScript codepage=65001 %>
  11. <%
  12. // *********************************************************************
  13. // SERVER-SIDE STRING VARIABLES FOR LOCALIZING
  14. // *********************************************************************
  15. var L_SESSION_EXPIRED = "Unable to retrieve Object.";
  16. // *********************************************************************
  17. %>
  18.  
  19.  
  20. <%
  21.  
  22.  
  23. function GetSession(name)
  24. {
  25.     return Session.Value(name);
  26. }
  27.  
  28. function SetSession(name, value)
  29. {
  30.     Session.Value(name) = value;
  31. }
  32.  
  33. function PreventCaching()
  34. {
  35.     // prevent browser from caching the page
  36.     var cache_date = new Date();
  37.     cache_date.setFullYear( cache_date.getFullYear() - 1 );
  38.     Response.ExpiresAbsolute = cache_date.getVarDate();
  39. }
  40.  
  41. PreventCaching();
  42.  
  43. try
  44. {  
  45.   var bridge;
  46.   bridge = GetSession("RptSrcBridge");
  47.   if (typeof(bridge) != "object")
  48.   {
  49.     bridge = Server.CreateObject( "CrystalReports.CRReportSourceBridge" );
  50.     SetSession("RptSrcBridge", bridge);
  51.   }
  52.      
  53.  bridge.ProcessHttpRequest();    
  54. }
  55. catch(e)
  56. {
  57.   Response.Write( L_SESSION_EXPIRED + "<BR>" );
  58.   Response.Write( e.description );
  59. }
  60.  
  61. %>
  62.